package com.seari.tunnel.mapper;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.seari.tunnel.entity.MaintenancePlan;
import com.seari.tunnel.entity.MaintenanceRecord;
import com.seari.tunnel.entity.RepairApply;

@Repository
public interface MaintenanceRepairMapper {
	
	List<MaintenancePlan> findMaintenancePlan();
	
	void addMaintenancePlan(MaintenancePlan maintenancePlan);
	
	void updateMaintenancePlan(MaintenancePlan maintenancePlan);
	
	void deleteMaintenancePlan(MaintenancePlan maintenancePlan);
	
	List<MaintenanceRecord> findMaintenanceRecord();
	
	List<MaintenanceRecord> findFinishMaintenanceRecord();
	
	void addMaintenanceRecord(MaintenanceRecord maintenanceRecord);
	
	void updateMaintenanceRecord(MaintenanceRecord maintenanceRecord);
	
	void deleteMaintenanceRecord(MaintenanceRecord maintenanceRecord);
	
	List<MaintenanceRecord> findMaintenanceRemind();
	
	List<RepairApply> findRepairApply();
	
	void addRepairApply(RepairApply repairApply);
	
	void deleteRepairApply(RepairApply repairApply);
	
	List<RepairApply> findRepairRecord();
	
	List<RepairApply> findFinishRepairRecord();
	
	void updateRepairRecord(RepairApply repairRecord);
	
	List<MaintenancePlan> findUnfinishedMaintenancePlan();
	
	MaintenancePlan findMaintenancePlanById(int id);
	
	MaintenancePlan findMaintenancePlanByMPId(int id);
	
	MaintenanceRecord findMiantenanceRecordById(int id);
	
    void updateRepairApply(RepairApply repairApply);
	
	void updateRepairState(RepairApply repairRecord);
	
	List<MaintenancePlan> findMaintenancePlanByDeviceCode(String DeviceCode);

}
